<%= error_messages_for 'site' %>

<!--[form:site]-->
<p><label for="site_name">Name</label><br/>
<%= text_field 'site', 'name'  %></p>   

<p><label for="site_name">Main Phone Number</label><br/>
<%= text_field 'site', 'phone'  %></p>

<p>
	<label for="site_manager">Manager</label><br/>
	<%= select("site", "manager_id", 
	           Manager.find_by_sql("SELECT users.* 
	                                  FROM users 
	                                  JOIN roles_users on (roles_users.user_id = users.id) 
	                                  JOIN roles on (roles_users.role_id = roles.id) 
	                                 WHERE roles.name = 'manager'").collect {|s| [ "#{s.display_name} - #{s.email}", s.id ] }) %>
</p>

<!--[eoform:site]-->

